move largefile and reentrant compiler flags up to the top level, rather than being...
[ardour2.git] / tools / Spotlight Importer / GetMetadataForFile.c
blob522b00cb0f1ebe8e2ec94d45f68a6aa20bfe2935
1 #include <CoreFoundation/CoreFoundation.h>
2 #include <CoreServices/CoreServices.h>
4 /* -----------------------------------------------------------------------------
5 Step 1
6 Set the UTI types the importer supports
8 Modify the CFBundleDocumentTypes entry in Info.plist to contain
9 an array of Uniform Type Identifiers (UTI) for the LSItemContentTypes
10 that your importer can handle
12 (DONE)
13 ----------------------------------------------------------------------------- */
15 /* -----------------------------------------------------------------------------
16 Step 2
17 Implement the GetMetadataForFile function
19 Implement the GetMetadataForFile function below to scrape the relevant
20 metadata from your document and return it as a CFDictionary using standard keys
21 (defined in MDItem.h) whenever possible.
22 ----------------------------------------------------------------------------- */
24 /* -----------------------------------------------------------------------------
25 Step 3 (optional)
26 If you have defined new attributes, update the schema.xml file
28 Edit the schema.xml file to include the metadata keys that your importer returns.
29 Add them to the <allattrs> and <displayattrs> elements.
31 Add any custom types that your importer requires to the <attributes> element
33 <attribute name="com_mycompany_metadatakey" type="CFString" multivalued="true"/>
35 ----------------------------------------------------------------------------- */
39 /* -----------------------------------------------------------------------------
40 Get metadata attributes from file
42 This function's job is to extract useful information your file format supports
43 and return it as a dictionary
44 ----------------------------------------------------------------------------- */
46 Boolean GetMetadataForFile(void* thisInterface,
47 CFMutableDictionaryRef attributes,
48 CFStringRef contentTypeUTI,
49 CFStringRef pathToFile)
51 /* Pull any available metadata from the file at the specified path */
52 /* Return the attribute keys and attribute values in the dict */
53 /* Return TRUE if successful, FALSE if there was no data provided */
55 #warning To complete your importer please implement the function GetMetadataForFile in GetMetadataForFile.c
56 return FALSE;